package com.example.designModel.single;

/**
 * Created by Quincy on 2018/9/10.
 * 懒汉模式
 */
public class Single2 {

    private static Single2 instance;

    private Single2(){}

    public static synchronized Single2 getInstance(){
        if (instance == null)
            instance = new Single2();
        return instance;

    }
}
